﻿using System;
using System.Collections.Generic;
using System.Text;
using Kugar.Core.Log.Interface;

namespace Kugar.Core.Log.NLogFactory
{
    public class NLogFactory : ILoggerFactory
    {
        public ILogger GetLogger()
        {
            return this.GetLogger("");
        }

        public ILogger GetLogger(string loggerName)
        {
            var l = NLog.LogManager.GetLogger(loggerName);

            if (l!=null)
            {
                return new NLogger(l);
            }
            else
            {
                return null;
            }
        }
    }
}
